using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;

namespace Demo.Net.Model
{
    public class Owner//业主信息表
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }//id
        [Required]
        public string? Name { get; set; }//业主姓名
        public string? Sex { get; set; }//业主性别
        [Required]
        public string? IdNumber { get; set; }//身份证号码
        [Required]
        public string? Phone { get; set; }//手机号码
        [Required]
        public string? Password { get; set; }//密码
        // [Column(TypeName = "nvarchar(max)")]//修改数据类型
        public string? Home { get; set; } //家庭地址

        public string? License { get; set; }//车牌号

        public int Room { get; set; }//房间号

        // public Boolean IsDeleted { get; set; } = false;//软删除
        [JsonIgnore]
        public List<Feedback>? feedBacks { get; set; }//导航属性 反馈表
        [JsonIgnore]
        public List<RentRecord>? RentRecords { get; set; }//导航属性 反馈表
    }
}